#ifndef _FIGURE_H_
#define _FIGURE_H_

#include<stdio.h>

struct pos{
	int x;
	int y;

	bool operator==(const pos& rhs) const{
		return (x==rhs.x && y==rhs.y)? true : false;
	}
};

class Figure{
protected:
	pos position;
	bool color;
	char letter;
	int count;
public:
	Figure();
	Figure(bool, int, int, char);
	virtual bool move(pos) const = 0;

	bool get_color() const;
	void set_color(bool);
       
	int get_x() const;
	int get_y() const;
	pos get_position() const;
	void set_position(int, int);
	char get_letter() const;
	void inc();
	virtual ~Figure(){};
};

class Rook: public Figure{
public:
	Rook(bool,int,int);
	virtual bool move(pos) const;
	virtual ~Rook(){};
};

class Knight: public Figure{
public:
	Knight(bool,int,int);
	virtual bool move(pos) const;
	virtual ~Knight(){};
};

class Bishop: public Figure{
public:
	Bishop(bool,int,int);
	virtual bool move(pos) const;
	virtual ~Bishop(){};
};

class Queen: public Figure{
public:
	Queen(bool,int,int);
	virtual bool move(pos) const;
	virtual ~Queen(){};
};

class King: public Figure{
public:
	King(bool,int,int);
	virtual bool move(pos) const;
	virtual ~King(){};
};

class Pawn: public Figure{
public:
	Pawn(bool,int,int);
	virtual bool move(pos) const;
	virtual ~Pawn(){};
};
#endif
